{% extends 'base.html' %}
{% load static %}

<!-- 内容标题（页眉） -->
{% block content-header %}
<div class="content-header">
    <div class="container-fluid">
        <div class="row mb-2">
            <div class="col-sm-6">
                <h5 class="m-0 text-dark">空值检测</h5>
            </div>
        </div>
    </div>
</div>
{% endblock %}

<!-- 主要内容 -->
{% block content %}

<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">空值检测</h3>
                        <div class="card-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <input type="text" name="table_search" class="form-control float-right" placeholder="Search">

                                <div class="input-group-append">
                                    <button type="submit" class="btn btn-default"><i class="fas fa-search"></i></button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.card-header -->
                    <div class="card-body">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th style="width: 40px">ID</th>
                                <th>表名</th>
                                <th>列名</th>
                                <th>总记录数量</th>
                                <th>空值记录数量</th>
                                <th>空值记录比率</th>
                                <th>非空记录数量</th>
                                <th>非空记录比率</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for info in data_overview_list %}
                            <tr>
                                <td>{{ info.id }}</td>
                                <td>{{ info.table_name }}</td>
                                <td>{{ info.column_name }}</td>
                                <td>{{ info.total_num }}</td>
                                <td><span class="badge bg-danger">{{ info.null_num }}</span></td>
                                <td><span class="badge bg-danger">{{ info.null_rate }}</span></td>
                                <td><span class="badge bg-warning">{{ info.not_null_num }}</span></td>
                                <td><span class="badge bg-warning">{{ info.not_null_rate }}</span></td>
                            </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                    <!-- /.card-body -->
                    <div class="card-footer clearfix">
                        <ul class="pagination pagination-sm m-0 float-right">
                            <li class="page-item"><a class="page-link" href="#">&laquo;</a></li>
                            <li class="page-item"><a class="page-link" href="#">1</a></li>
                            <li class="page-item"><a class="page-link" href="#">2</a></li>
                            <li class="page-item"><a class="page-link" href="#">3</a></li>
                            <li class="page-item"><a class="page-link" href="#">&raquo;</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div><!-- /.container-fluid -->
</section>
<!-- /.content -->

{% endblock %}

<!-- script -->
{% block extra-js %}
{% endblock %}